//
//  BookDocumentController.m
//  Book Editor
//
//  Created by Chris Karr on 6/21/08.
//  Copyright 2008 Northwestern University. All rights reserved.
//

#import "BookDocumentController.h"
#import "BookDocument.h"

@implementation BookDocumentController

- (void) noteNewRecentDocumentURL:(NSURL *) aURL
{
	if ([self currentDocument])
	{
		NSString * path = [aURL path];
		
		if ([path hasSuffix:DATAFILE])
			path = [[path stringByDeletingLastPathComponent] stringByDeletingLastPathComponent];
		
		NSURL * url = [NSURL fileURLWithPath:path];
		
		[super noteNewRecentDocumentURL:url];
	}
}

@end
